package com.example.myapplication.beans;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class CartData {
    private static CartData instance;
    private Map<String, Object> cartParams;

    private CartData() {
        cartParams = new HashMap<>();
    }

    public static synchronized CartData getInstance() {
        if (instance == null) {
            instance = new CartData();
        }
        return instance;
    }

    public void setCartParams(Map<String, Object> params) {
        cartParams.clear();
        cartParams.putAll(params);
    }

    public Map<String, Object> getCartParams() {
        return cartParams;
    }
}
